<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>倒计时</title>
	</head>
	<script type="text/javascript">
		var i=10;
		function timer(){		
			document.getElementById("myclock").innerHTML=i;	
			i--;
			if(i==1){
				window.location.href="http://www.baidu.com";
			    window.clearInterval(myTime);
			}		
		}
		var myTime=setInterval("timer()",1000);
	</script>
	<body>
		<div id="myclock"></div>
	</body>
</html>
